home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Vk / VkTabPanel.z / VkTabPanel
Encoding:
Text File  |  1998-10-20  |  29.4 KB  |  793 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkTabPanel - A component for displaying a tabular control panel
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkComponent : VkCallbackObject
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkTabPanel.h>
  16.  
  17. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  18.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  19.            VkTabPanel(char* name, Widget parent,
  20.                      Boolean horizOrientation = True,
  21.                      int tabHeight = 0);
  22.            virtual void ~VkTabPanel(void);
  23.  
  24.  
  25.    CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn
  26.            Pixel getSelectedTabBg(void);
  27.  
  28.  
  29.            Pixel getUnselectedTabBg(void);
  30.  
  31.  
  32.            Boolean horiz(void);
  33.  
  34.  
  35.            Boolean uniformTabs(void);
  36.  
  37.  
  38.            int size(void);
  39.  
  40.  
  41.            Pixel tabBg(void);
  42.  
  43.  
  44.            Pixel selectedTabBg(void);
  45.  
  46.  
  47.            Pixel labelFg(void);
  48.  
  49.  
  50.            Pixel labelBg(void);
  51.  
  52.  
  53.            GC gc(void);
  54.  
  55.  
  56.            int lineThickness(void);
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  71.  
  72.  
  73.  
  74.            int tabHeight(void);
  75.  
  76.  
  77.    SSSSeeeettttuuuupppp FFFFuuuunnnnccccttttiiiioooonnnnssss
  78.            int addTab(char* label, void* clientData,
  79.                       Boolean sorted = False);
  80.  
  81.  
  82.            void addTabs(char** labels, void** clientData,
  83.                         int numLabels,
  84.                         Boolean sorted = False);
  85.  
  86.  
  87.            Boolean removeTab(int index);
  88.  
  89.  
  90.            Boolean removeTab(char* label);
  91.  
  92.  
  93.            Boolean tabPixmap(int index, Pixmap* pixmap_return);
  94.  
  95.  
  96.            Boolean tabPixmap(char* label, Pixmap* pixmap_return);
  97.  
  98.  
  99.            Boolean setTabPixmap(int index, Pixmap pixmap);
  100.  
  101.  
  102.            Boolean setTabPixmap(char* label, Pixmap pixmap);
  103.  
  104.  
  105.            Boolean setTabLabel(int index, char* label);
  106.  
  107.  
  108.            Boolean setTabClientData(int index, void* clientData);
  109.  
  110.  
  111.  
  112.    TTTTaaaabbbb WWWWiiiiddddtttthhhh FFFFuuuunnnnccccttttiiiioooonnnnssss
  113.            int  getTabWidth (int index=0);
  114.  
  115.  
  116.            int  getMaxTabWidth ();
  117.  
  118.  
  119.            void matchTabWidth (VkTabPanel* panel=NULL,
  120.                                enum VK_TAB_MATCH_WIDTH =VK_DEFAULT);
  121.  
  122.  
  123.            void setTabWidth (int width=0);
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  137.  
  138.  
  139.  
  140.            void setTabWidth (char*);
  141.  
  142.  
  143.  
  144.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  145.            int selectedTab(void);
  146.  
  147.  
  148.            Boolean getTab(int index, char** label_return,
  149.                            void** clientData_return);
  150.  
  151.  
  152.            Widget area1(void);
  153.  
  154.  
  155.            Widget area2(void);
  156.  
  157.  
  158. XXXX RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD WWWWIIIITTTTHHHH TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  159.            additionalMarginHeight    Added to tab label margin
  160.  
  161.            additionalMarginWidth     Added to tab label margin
  162.  
  163.            background                Background component color, around tabs
  164.  
  165.            darkPercent               Set the unselected tabs' background to a color
  166.                                      that is this percentage of the way between the
  167.                                      selected tab's background color and the selected
  168.                                      tab's BottomShadow color.
  169.  
  170.            endMultiplier             End-indicator duplication (3)
  171.  
  172.            endSpacing                End-indicator internal spacing (9)
  173.  
  174.            lineThickness             Thickness of tab edges (1)
  175.  
  176.            margin                    Margin between tab edges and the component edge (5)
  177.  
  178.            margin1                   Margin between workarea1 and the tabs (5)
  179.  
  180.            margin2                   Margin between workarea2 and the tabs (5)
  181.  
  182.            pixmapSpacing             Spacing between tab label and pixmap (3)
  183.  
  184.            selectedTabBackground     Different background used for the selected tab (none)
  185.  
  186.            sideOffset                Tab edge curvature (17)
  187.  
  188.            tabHeight                 Tab height (0, use label height)
  189.  
  190.            tabLabel.background       Background used for tabs, bitmaps
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  203.  
  204.  
  205.  
  206.            tabLabel.fontList         Font used for tab labels
  207.  
  208.            tabLabel.foreground       Foreground used for tab labels, bitmaps
  209.  
  210.            tabLabel.height           Tab height default if tabHeight is 0
  211.  
  212.            tabLabel.marginHeight     Tab label margin
  213.  
  214.            tabLabel.marginWidth      Tab label margin
  215.  
  216.            uniformTabs               Whether tabs should be all the same width (False)
  217.  
  218.            use3DTabs                 Draw the tabs with a shaded, 3-D, appearance
  219.  
  220.  
  221. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  222.           VkTabPanel presents a row or column of overlayed tabs.  One tab is
  223.           always selected, and appears on top of all the others.  The user can
  224.           left-click on a tab to select it.
  225.  
  226.           If the orientation is horizontal, work areas are provided to the
  227.           left and right of the tab display for application use.  If the
  228.           orientation is vertical, work areas are provided above and below the
  229.           tab display.
  230.  
  231.           When the tabs do not fit within the provided space, end-indicators
  232.           appear as necessary to represent a set of collapsed tabs.  When the
  233.           user left-clicks or right-clicks in an end-indicator, a popup menu
  234.           appears listing all the tabs.  The user may choose an item to select
  235.           the corresponding tab.
  236.  
  237.  
  238.  
  239. DDDDEEEERRRRIIIIVVVVIIIINNNNGGGG SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSSEEEESSSS
  240.           A private class, VkTabArea, does virtually all of the work.
  241.           VkTabPanel creates a VkTabArea amongst the work areas and other
  242.           Motif widgets.  VkTabArea's public interface is the same as
  243.           VkTabPanel's interface.  Many of the VkTabPanel methods simply call
  244.           the corresponding VkTabArea methods.
  245.  
  246.  
  247.  
  248. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  249.    VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll(((())))
  250.            VkTabPanel(char* name, Widget parent,
  251.                      Boolean horizOrientation = True,
  252.                      int tabHeight = 0);
  253.  
  254.            virtual void ~VkTabPanel(void);
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  269.  
  270.  
  271.  
  272.           VkTabPanel creates a component using the name and parent parameters.
  273.           The optional horizOrientation argument can be used to create a
  274.           vertically-oriented VkTabPanel instead of the default horizontal
  275.           orientation.  The tabHeight argument defaults to 0, indicating that
  276.           the default label height should determine the height of the tabs.
  277.           Applications which display pixmaps in the tabs may want to specify a
  278.           height for the tabs.
  279.  
  280.    ggggeeeettttSSSSeeeelllleeeecccctttteeeeddddTTTTaaaabbbbBBBBgggg(((())))
  281.           Pixel getSelectedTabBg(void);
  282.  
  283.  
  284.           Returns the color used for the selected tab background.  This color
  285.           is set by the "selectedTabBackground" resource.  If no resource
  286.           value is specified, the normal tab background color is used.
  287.  
  288.    ggggeeeettttUUUUnnnnsssseeeelllleeeecccctttteeeeddddTTTTaaaabbbbBBBBgggg(((())))
  289.           Pixel getUnselectedTabBg(void);
  290.  
  291.  
  292.           Returns the color used for the unselected tab background.  This
  293.           color is a calculated value.
  294.  
  295.    hhhhoooorrrriiiizzzz(((())))
  296.            Boolean horiz(void);
  297.  
  298.  
  299.           This function returns TRUE if the tab component is horizontally-
  300.           oriented, FALSE otherwise.
  301.  
  302.    uuuunnnniiiiffffoooorrrrmmmmTTTTaaaabbbbssss(((())))
  303.            Boolean uniformTabs(void);
  304.  
  305.  
  306.           This function returns TRUE if the tabs have a uniform width (or
  307.           height, if the tab component is vertically-oriented).  By default,
  308.           tabs take on the necessary width to display their label and pixmap.
  309.           If the "uniformTabs" resource is set to "true", all tabs take on the
  310.           width of the largest tab in the group.
  311.  
  312.           The total width of a tab is the sum of its label width and if it has
  313.           a non-NULL pixmap, the pixmap spacing plus the pixmap size.  The
  314.           pixmap spacing is set by the "pixmapSpacing" resource of the
  315.           VkTabPanel baseWidget, which defaults to 3.  Also included is the
  316.           tab margin width, which is set by the "marginWidth" resource of the
  317.           "tabLabel" widget created by VkTabPanel plus the
  318.           "additionalMarginWidth" resource of the VkTabPanel baseWidget, which
  319.           defaults to 4.
  320.  
  321.           When the tabs are displayed, the amount of overlap is set by the
  322.           "sideOffset" resource of the VkTabPanel baseWidget, which defaults
  323.           to 17.  When the tabs do not fit within the provided space, end-
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  335.  
  336.  
  337.  
  338.           indicators are displayed.  Their appearances are set by the
  339.           "endSpacing" and "endMultiplier" resources which affect the line
  340.           spacing and number of lines drawn.  They default to 9 and 3,
  341.           respectively.
  342.  
  343.    ssssiiiizzzzeeee(((())))
  344.           int size(void);
  345.  
  346.  
  347.           Returns the number of tabs in the group.
  348.  
  349.    ttttaaaabbbbBBBBgggg(((())))
  350.           Pixel tabBg(void);
  351.  
  352.  
  353.           Returns the color used for the background area underneath the tabs.
  354.           This color is set by the "background" resource of the VkTabPanel
  355.           baseWidget.
  356.  
  357.    sssseeeelllleeeecccctttteeeeddddTTTTaaaabbbbBBBBgggg(((())))
  358.           Pixel selectedTabBg(void);
  359.  
  360.  
  361.           Returns the color used for the selected tab background.  This color
  362.           is set by the "selectedTabBackground" resource.  If no resource
  363.           value is specified, the normal tab background color is used.
  364.  
  365.    llllaaaabbbbeeeellllFFFFgggg(((())))
  366.           Pixel labelFg(void);
  367.  
  368.  
  369.           Returns the color used for tab foregrounds (e.g. the tab lettering).
  370.           This color is set by the "foreground" resource for the "tabLabel"
  371.           widget created by VkTabPanel.  When a bitmap is supplied as the
  372.           pixmap, this color is used for the 1 bits.
  373.  
  374.    llllaaaabbbbeeeellllBBBBgggg(((())))
  375.           Pixel labelBg(void);
  376.  
  377.  
  378.           Returns the color used for tab backgrounds.  This color is set by
  379.           the "background" resource for the "tabLabel" widget created by
  380.           VkTabPanel.  When a bitmap is supplied as the pixmap, this color is
  381.           used for the 0 bits unless the tab is selected and a
  382.           selectedTabBackground color resource exists.
  383.  
  384.    ggggcccc(((())))
  385.           GC gc(void);
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  401.  
  402.  
  403.  
  404.           Returns the X graphics context used for drawing the tabs.  This may
  405.           be useful to an application when it creates pixmaps and wants to use
  406.           the same foreground and background colors as the tabs.
  407.  
  408.           This function is now deprecated, in favor of _g_e_t_S_e_l_e_c_t_e_d_T_a_b_B_g() and
  409.           _g_e_t_U_n_s_e_l_e_c_t_e_d_T_a_b_B_g().  _g_c() is meaningful only with use3DTabs =
  410.           FALSE.  Applications that construct pixmaps for tab labels should
  411.           set use3DTabs = TRUE and use the new functions to get their
  412.           backgrounds.
  413.  
  414.    lllliiiinnnneeeeTTTThhhhiiiicccckkkknnnneeeessssssss(((())))
  415.           int lineThickness(void);
  416.  
  417.  
  418.           Returns the line thickness used when drawing the tab edges.  The
  419.           line thickness defaults to 1, but can be set by the "lineThickness"
  420.           resource of the VkTabPanel baseWidget.  However, line thickness
  421.           other than 1 may not render properly.
  422.  
  423.    ttttaaaabbbbHHHHeeeeiiiigggghhhhtttt(((())))
  424.           int tabHeight(void);
  425.  
  426.  
  427.           Returns the height of the tab display area.  This is the maximum
  428.           display height for pixmaps.  Pixmaps which are greater than this
  429.           size will be truncated, and pixmaps which are smaller will be
  430.           centered.  This height can be specified in the constructor, or by
  431.           the "tabHeight" resource of the VkTabPanel baseWidget, or by the
  432.           font height of the "tabLabel" widget created by VkTabPanel.
  433.  
  434.           The total tab height is the tab display area height, plus the tab
  435.           margin height, which is set by the "marginHeight" resource of the
  436.           "tabLabel" widget created by VkTabPanel plus the
  437.           "additionalMarginHeight" resource of the VkTabPanel baseWidget,
  438.           which defaults to 2.
  439.  
  440.           The difference between the VkTabPanel component's height (or width,
  441.           if vertically-oriented) and the true height of its tabs, is set by
  442.           the "margin" resource of the VkTabPanel baseWidget, which defaults
  443.           to 5.
  444.  
  445.    sssseeeelllleeeecccctttteeeeddddTTTTaaaabbbb(((())))
  446.           int selectedTab(void);
  447.  
  448.  
  449.           Returns the index of the currently-selected tab.  Tab indices start
  450.           with zero.  The maximum tab index, then, is size()-1.
  451.  
  452.    aaaarrrreeeeaaaa1111(((())))
  453.           Widget area1(void);
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  467.  
  468.  
  469.  
  470.           Returns the first work area.  This is a Motif XmForm widget placed
  471.           to the left of the tabs in a horizontal tab group, and above the
  472.           tabs in a vertical group.  The work area is separated from the tabs
  473.           by the number of pixels specified by the "margin1" resource of the
  474.           VkTabPanel baseWidget, which defaults to 5.
  475.  
  476.    aaaarrrreeeeaaaa2222(((())))
  477.           Widget area2(void);
  478.  
  479.  
  480.           Returns the second work area.  This is a Motif XmForm widget placed
  481.           to the right of the tabs in a horizontal tab group, and below the
  482.           tabs in a vertical group.  The work area is separated from the tabs
  483.           by the number of pixels specified by the "margin2" resource of the
  484.           VkTabPanel baseWidget, which defaults to 5.
  485.  
  486.    aaaaddddddddTTTTaaaabbbb
  487.           int addTab(char* label, void* clientData, Boolean sorted = False);
  488.           void addTabs(char** labels, void** clientData, int numLabels,
  489.                        Boolean sorted = False);
  490.  
  491.  
  492.           Adds a new tab to the group.  The label is used as a resource lookup
  493.           for the actual label string and if no resource match is found, used
  494.           verbatim as the string.  The clientData argument is for the
  495.           application's convenience, and is returned in the
  496.           VkTabCallbackStruct when that tab is selected.  New tabs initially
  497.           have a NULL pixmap.  If the new tab is the first tab in the group,
  498.           it is automatically selected.  The index of the newly-added tab is
  499.           returned.  The addTabs form simply takes a list of new tabs to be
  500.           added.
  501.  
  502.           The new tab is added to the end of the group unless the optional
  503.           sorted argument is set to TRUE, in which case the tab is inserted
  504.           before the first tab whose label alphabetically succeeds the new
  505.           tab's label.
  506.  
  507.           If the tab added is the first tab in the panel, this tab will get
  508.           selected and the tabSelectCallback will be invoked.
  509.  
  510.    sssseeeelllleeeeccccttttTTTTaaaabbbb(((())))
  511.            Boolean selectTab(int index, XEvent* event = NULL);
  512.            Boolean selectTab(char* label, XEvent* event = NULL);
  513.  
  514.  
  515.           Selects a tab.  The tab's index or label can be used for selection.
  516.           If the operation succeeds, TRUE is returned.  If the tab couldn't be
  517.           found or if the index is out of range, FALSE is returned.  The
  518.           optional event parameter is passed in the VkTabCallbackStruct for
  519.           possible application use.  If more than one tab match the label, the
  520.           first one is selected.
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  533.  
  534.  
  535.  
  536.    rrrreeeemmmmoooovvvveeeeTTTTaaaabbbb(((())))
  537.            Boolean removeTab(int index);
  538.            Boolean removeTab(char* label);
  539.  
  540.  
  541.           Removes a tab from the list.  The tab's index or label can be used
  542.           for selection.  If the operation succeeds, TRUE is returned.  If the
  543.           tab couldn't be found or if the index is out of range, FALSE is
  544.           returned.  If more than one tab match the label, the first one is
  545.           selected.
  546.  
  547.    ttttaaaabbbbPPPPiiiixxxxmmmmaaaapppp(((())))
  548.            Boolean tabPixmap(int index, Pixmap* pixmap_return);
  549.            Boolean tabPixmap(char* label, Pixmap* pixmap_return);
  550.  
  551.  
  552.           Returns the pixmap associated with a tab.  The tab's index or label
  553.           can be used for selection.  If the operation succeeds, TRUE is
  554.           returned and the pixmap is returned through the pixmap_return
  555.           argument.  If the tab couldn't be found or if the index is out of
  556.           range, FALSE is returned.  If more than one tab match the label, the
  557.           first one is selected.
  558.  
  559.    sssseeeettttTTTTaaaabbbbPPPPiiiixxxxmmmmaaaapppp(((())))
  560.            Boolean setTabPixmap(int index, Pixmap pixmap);
  561.            Boolean setTabPixmap(char* label, Pixmap pixmap);
  562.  
  563.  
  564.           Changes the pixmap associated with a tab.  Use a NULL pixmap to
  565.           eliminate the pixmap display.  The tab's index or label can be used
  566.           for selection.  If the operation succeeds, TRUE is returned and the
  567.           tabs are redrawn.  If the tab couldn't be found or if the index is
  568.           out of range, FALSE is returned.  If more than one tab match the
  569.           label, the first one is selected.
  570.  
  571.    sssseeeettttTTTTaaaabbbbLLLLaaaabbbbeeeellll(((())))
  572.           Boolean setTabLabel(int index, char* label);
  573.  
  574.  
  575.           Changes the label associated with a tab.  The label is used as a
  576.           resource lookup for the actual label string and if no resource match
  577.           is found, used verbatim as the string.  If the operation succeeds,
  578.           TRUE is returned and the tabs are redrawn.  If the index is out of
  579.           range, FALSE is returned.
  580.  
  581.    sssseeeettttTTTTaaaabbbbCCCClllliiiieeeennnnttttDDDDaaaattttaaaa(((())))
  582.           Boolean setTabClientData(int index, void* clientData);
  583.  
  584.  
  585.           Changes the clientData associated with a tab.  If the operation
  586.           succeeds, TRUE is returned and the tabs are redrawn.  If the index
  587.           is out of range, FALSE is returned.
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  599.  
  600.  
  601.  
  602.    ggggeeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh(((())))
  603.           int  getTabWidth (int index=0);
  604.  
  605.  
  606.           Returns the width of the tab whose index is passed.  (Tabs are
  607.           indexed from 0 to n-1.)
  608.  
  609.  
  610.    ggggeeeettttMMMMaaaaxxxxTTTTaaaabbbbWWWWiiiiddddtttthhhh(((())))
  611.           int  getMaxTabWidth ();
  612.  
  613.  
  614.           Gets the width that will be used to display the widest tab.  This
  615.           may not be wide enough to accommodate all labels if sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh(((())))
  616.           has been used.
  617.  
  618.  
  619.    mmmmaaaattttcccchhhhTTTTaaaabbbbWWWWiiiiddddtttthhhh(((())))
  620.           void matchTabWidth (VkTabPanel *tp=NULL,
  621.                               enum VK_TAB_MATCH_WIDTH = VK_DEFAULT);
  622.  
  623.  
  624.           This introduces the concept of a tab panel match set.  When a
  625.           VkTabPanel's mmmmaaaattttcccchhhhTTTTaaaabbbbWWWWiiiiddddtttthhhh(((()))) member is called, that VkTabPanel is
  626.           assumed to be the set leader.  It does not matter which tab panel
  627.           you pick to be the set leader.  All it does is some record-keeping.
  628.           But you do need to be consistent about it.  (The concept of a set
  629.           leader is regarded as an unfortunate implementation limitation that
  630.           we shall remove later if there is enough demand to do so.)
  631.  
  632.           If the ggggeeeettttMMMMaaaaxxxxTTTTaaaabbbbWWWWiiiiddddtttthhhh(((()))) for ttttpppp is larger than that of the existing
  633.           set, then the existing set's VkTabPanel's are each set to the new
  634.           width.  Otherwise ttttpppp is set to the width of the existing set.  In
  635.           either case, ttttpppp is added to the match set.
  636.  
  637.           mmmmaaaattttcccchhhhTTTTaaaabbbbWWWWiiiiddddtttthhhh(((()))) sets widths using sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh(((()))).
  638.  
  639.           /fBVK_DEFAULT is the only current setting for the enum.  It is
  640.           provided so we have an easy extension mechanism if we later need to
  641.           use a different definition of matching.
  642.  
  643.  
  644.    sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh(((())))
  645.            void setTabWidth (int width=0);
  646.            void setTabWidth (char *longestString);
  647.  
  648.  
  649.           Normally, each tab is the right size to hold its label.  That means
  650.           that each tab in a single VkTabPanel is sized independently.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  665.  
  666.  
  667.  
  668.           sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh sets the width of each tab for a single VkTabPanel to a
  669.           single value.  wwwwiiiiddddtttthhhh sets the width to that number of pixels.
  670.           lllloooonnnnggggeeeessssttttSSSSttttrrrriiiinnnngggg sets the width to be enough to hold the specified
  671.           string.  The string does not need to be an actual tab label,
  672.           although generally it will be.  If the labels will be translated, be
  673.           careful.  The longest string in one language may not be the longest
  674.           one in all languages.
  675.  
  676.           In most cases it will be easier to synchronize tab widths with
  677.           mmmmaaaattttcccchhhhTTTTaaaabbbbWWWWiiiiddddtttthhhh.  sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh is provided for those cases where an
  678.           application needs more control than mmmmaaaattttcccchhhhTTTTaaaabbbbWWWWiiiiddddtttthhhh gives.
  679.  
  680.           If sssseeeettttTTTTaaaabbbbWWWWiiiiddddtttthhhh((((0000)))), then tab width reverts to being calculated
  681.           according to the length of the label.
  682.  
  683.  
  684. DDDDAAAATTTTAAAA MMMMEEEEMMMMBBBBEEEERRRR DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  685.    ttttaaaabbbbSSSSeeeelllleeeeccccttttCCCCaaaallllllllbbbbaaaacccckkkk
  686.           static const const char* tabSelectCallback;
  687.  
  688.  
  689.           A callback function for detecting changes in the selected tab.  The
  690.           callData argument to the callback should be cast to a
  691.           (VkTabCallbackStruct *).  This structure returns the tab's label and
  692.           clientData as passed to addTab, the current tab index, and the event
  693.           which triggered the selection.  The event may be NULL, if the user
  694.           used the popup menu or the selection was programmatic.
  695.  
  696.    ttttaaaabbbbPPPPooooppppuuuuppppCCCCaaaallllllllbbbbaaaacccckkkk
  697.           static const const char* tabPopupCallback;
  698.  
  699.  
  700.           A callback function for detecting when the user right-buttons in a
  701.           tab.  The callData argument to the callback should be cast to a
  702.           (VkTabCallbackStruct *).  This structure returns the tab's label and
  703.           clientData as passed to addTab, the current tab index, and the event
  704.           which triggered the selection.
  705.  
  706.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  707.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  708.           setDefaultResources(), getResources(), manage(), unmanage(),
  709.           baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
  710.  
  711.  
  712.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  713.           callCallbacks(), addCallback(), removeCallback(),
  714.           removeAllCallbacks()
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))                                                  VVVVkkkkTTTTaaaabbbbPPPPaaaannnneeeellll((((3333xxxx))))
  731.  
  732.  
  733.  
  734. SEE ALSO
  735.      VkComponent
  736.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  737.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  738.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  739.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.